﻿<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我跟云宝宝在一起的恋爱时间</title>

<style type="text/css">
@font-face {
	font-family: digit;
	src: url('digital-7_mono.ttf') format("truetype");
}
</style>

<link href="{{size.url}}/public/css/default.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="{{size.url}}/public/js/love-js/jquery.js"></script>
<script type="text/javascript" src="{{size.url}}/public/js/love-js/garden.js"></script>
<script type="text/javascript" src="{{size.url}}/public/js/love-js/functions.js"></script>

</head>

<body>

<div id="mainDiv">
	<div id="content">
		<div id="loveHeart">
			<div id="code">
				<div id="ourloveTimeInterval"></div>
				女生姓名:<span class="keyword">滕如云</span><br />
				男生姓名:<span class="keyword">荆中志</span><br />
				我们在一起了！！
			</div>
			<canvas id="garden"></canvas>
			<div id="words">
				<div id="messages">
					亲爱的，这是我们相爱在一起的时光。
					<div id="elapseClock"></div>
				</div>
				<div id="loveu">
					爱你直到永永远远。<br/>
					<div class="signature">- 荆中志</div>
				</div>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript">

$("#ourloveTimeInterval").text("时间：2015-10-29 00:09:25 ~ " + getNowFormatDate());

var together = new Date();
/* 2015年10月29日 */
together.setFullYear(2015, 9, 29);
together.setHours(0, 9, 25, 0);

if (!document.createElement('canvas').getContext) {
	var msg = document.createElement("div");
	msg.id = "错误信息:";
	msg.innerHTML = "浏览器不支持HTML5！<br/>推荐使用chrome、IE 9+ 、Firefox、360、QQ、猎豹、Opera、傲游、搜狗、搜狗浏览器等"; 
	document.body.appendChild(msg);
	$("#code").css("display", "none")
	$("#copyright").css("position", "absolute");
	$("#copyright").css("bottom", "10px");
	document.execCommand("stop");
} else {
	setTimeout(function () {
		startHeartAnimation();
	}, 5000);

	timeElapse(together);
	setInterval(function () {
		timeElapse(together);
	}, 500);
	adjustCodePosition();
	$("#code").typewriter();
}

function getNowFormatDate() {
    var date = new Date();
    var seperator1 = "-";
    var seperator2 = ":";
    var month = date.getMonth() + 1;
    var strDate = date.getDate();
    var hour = date.getHours();
    var minute = date.getMinutes();
    var second = date.getSeconds();
    if (month >= 1 && month <= 9) {
        month = "0" + month;
    }
    if (strDate >= 0 && strDate <= 9) {
        strDate = "0" + strDate;
    }
    if (hour >= 0 && hour <= 9) {
        hour = "0" + hour;
    }
    if (minute >= 0 && minute <= 9) {
        minute = "0" + minute;
    }
    if (second >= 0 && second <= 9) {
        second = "0" + second;
    }
    var currentdate = (date.getYear()+1900) + seperator1 + month + seperator1 + strDate
            + " " + hour+ seperator2 + minute + seperator2 + second;
    return currentdate;
}
</script>
<div style="text-align:center;clear:both">
</div>
</body>
</html>